/**
 * @作者: xiaoxun
 * @日期: 2025/3/9 14:20
 * @描述:学生类
 */
public class Student implements Comparable<Student>{
	private String name;
	private int age;
	private double height;
	public Student() {
	}

	public Student(String name, int age, double height) {
		this.name = name;
		this.age = age;
		this.height = height;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public double getHeight() {
		return height;
	}

	public void setHeight(double height) {
		this.height = height;
	}

	@Override
	public String toString() {
		return "Student{" + "name='" + name + '\'' + ", age=" + age + ", height=" + height + '}'+"\n";
	}

	@Override
	public int compareTo(Student o) {

		return this.age-o.age;
	}
}

